   function JSTest_SetConfig()
   {             
			
		NetcaPKI.setConfig(SetConfig.value);
			 

		if(NetcaPKI.getLastError()!=NetcaPKI.OK)
        {
            alert(NetcaPKI.getLastErrorMsg());
			return;
        }
		alert("设置完成");
             
        
    }


    function JSTest_Version()
    {

  
		var info=NetcaPKI.getVersion();
		if(NetcaPKI.getLastError()!=NetcaPKI.OK)
        {
            alert(NetcaPKI.getLastErrorMsg());
			return;
        }
        alert(info);

        
    }


    function JSTest_SetErrorMode(bUseException)
    {
   
		 NetcaPKI._baseObject.SetErrorMode(parseInt(bUseException));
  
    }
    
 
    
    function JSTest_SetPwdCacheOption(bCache)
    {
       
		 NetcaPKI.setPwdCacheOption(parseInt(bCache));
   
    }
    
    function JSTest_IsKeyInserted()
    {
     
	 	 var bInsert=NetcaPKI.isKeyInserted();    
         if(bInsert)
         {
             alert("检测到key插入了!")
         }
         else{
               alert("没有检测到key插入!")
         }
 
    }


    function JSTest_GetLastErrorMsg()
    {
  
		   var strError=NetcaPKI.getLastErrorMsg();    
           
           alert(strError)
       
            
  
    }
  
    function JSTest_SetFilterCertCondition()
    {
        
		NetcaPKI.setFilterCertCondition(FilterCertCondition.value);  
		if(NetcaPKI.getLastError()!=NetcaPKI.OK)
        {
            alert(NetcaPKI.getLastErrorMsg());
			return;
        }  
		
        alert("设置成功:"+NetcaPKI.getFilterCertCondition());
 
        
    }

	function JSTest_EnvelopedDataSetEncAlgo(algo)
    {
        
		 NetcaPKI.envelopedDataSetEncAlgo(parseInt(algo));    
         if(NetcaPKI.getLastError()!=NetcaPKI.OK)
        {
            alert(NetcaPKI.getLastErrorMsg());
			return;
        }  
		 alert("设置成功:"+NetcaPKI.envelopedDataGetEncAlgo());
 
        
    }

    
	function JSTest_SignedDataSetIncludeCertOption(algo)
    {
    
		 NetcaPKI.signedDataSetIncludeCertOption(parseInt(algo));    
         if(NetcaPKI.getLastError()!=NetcaPKI.OK)
        {
          
			return;
        }  
		
        alert("设置成功:"+NetcaPKI.signedDataGetIncludeCertOption());

        
    }
	
    function JSTest_SetSelectCertPolicy()
    {
        
		 NetcaPKI.setSelectCertPolicy(SetSelectCertPolicy.value);    
		 if(NetcaPKI.getLastError()!=NetcaPKI.OK)
         {
                alert(NetcaPKI.getLastErrorMsg());
				return;
         }

         alert("设置成功:"+NetcaPKI.getSelectCertPolicy());
	 
        
    }


	function JSTest_Reset()
    {
     
		 NetcaPKI.resetConfig();    
         loadHtml();
      
    }